/*
 * To change  this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sommm;

/**
 *
 * @author theodorcostache
 */
public class Dimensiune {
    int aparitii;
    int id;

    public Dimensiune(String p_nume)
    {
        id  =  Dictionar.getInstance().getId(p_nume);
        aparitii = 0;
    }

    public String getNume() {
        return Dictionar.getInstance().getString(id);
    }

    public void increment()
    {
        aparitii++;
    }

    public boolean  egal(Dimensiune d)
    {
        return (d.getNume().equals(Dictionar.getInstance().getString(id)));
    }

    public int getAparitii() {
        return aparitii;
    }

    public void setAparitii(int aparitii) {
        this.aparitii = aparitii;
    }

    public void  addAparitii(int aparitii) {
        this.aparitii += aparitii;
    }

    public void  divAparitii(int val) {
        this.aparitii /= val;
    }
}
